package com.santu.edu.supporter.biz.team.pojo.po;

import java.io.Serializable;
import java.util.Date;

import com.santu.edu.supporter.biz.team.pojo.dto.UserTeamDTO;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 
 * @TableName edu_supporter_user_team
 */
@Data
@Accessors(chain = true)
public class UserTeamPO implements Serializable {
    /**
     * 
     */
    private Long id;

    /**
     * 学校id
     */
    private String schoolId;

    /**
     * 团队id
     */
    private String teamId;

    /**
     * 负责人id
     */
    private String userId;

    /**
     * 团队名称
     */
    private String teamName;

    /**
     * 团队类型[0:快递]
     */
    private Integer teamType;

    /**
     * 
     */
    private String gmtCreate;

    /**
     * 
     */
    private String gmtModified;

    private static final long serialVersionUID = 1L;

    public static UserTeamPO createItem(UserTeamDTO dto) {
        return new UserTeamPO()
                .setSchoolId(dto.getSchoolId())
                .setTeamId(dto.getTeamId())
                .setUserId(dto.getUserId())
                .setTeamName(dto.getTeamName())
                .setTeamType(dto.getTeamType().getCode());
    }
}